<template>
    <uni-nav-bar style="z-index:999;" left-tex="rose" :left-icon="leftIcon" @clickLeft="clickLeft" :title="title" :fixed="fixed" :statusBar='!isDouyin'>
        <view slot="left">
            <slot name="left"></slot>
        </view>
        <view slot="right">
            <slot name="right"></slot>
        </view>
        <view slot="default">
            <slot name="default"></slot>
        </view>
    </uni-nav-bar>
</template>

<script>

export default{
    name:'nav-bar',
    props:{
        fixed:{
            type:Boolean,
            default:true
        },
        title:{
            type:String,
            default:''
        },
        clickLeft:{
            type:Function,
            default:()=>{
				return ()=>{
					console.log('left')
				}
			}
        },
        leftIcon:{
            type:String,
            default:'left'
        },
		lefttext:{
			type:String,
			default:'rose'
		}
    },
    created(){
        console.log('导航栏',this.lefttext);
    },
    computed:{
        isWin(){
			// console.log('this.$store.getters.getPlatform',this.$store.getters.getsysteminfo.uniPlatform)
            return this.$store.getters.getsysteminfo.uniPlatform == "windows";
        },
		isDouyin(){
			return ["mp-toutiao","app","web"].includes(this.$store.getters.getsysteminfo.uniPlatform)
		}
    }
}

</script>

<style scoped>

</style>
